package basic;

import java.util.Stack;

/**
 * @Author: 海琳琦
 * @Date: 2021/9/6 11:11
 */
public class Title70 {

    public static void main(String[] args) {
        System.out.println(climbStairs(45));
    }

    private static int climbStairs(int n) {
        int p, q=0, r=1;
        for (int i = 1; i <=n; i++) {
            p=q;
            q=r;
            r=p+q;
        }
        return r;
    }
}
